Crate winter_prover
source ·Expand description
This crate contains Winterfell STARK prover.
This prover can be used to generate proofs of computational integrity using the STARK (Scalable Transparent ARguments of Knowledge) protocol.
When the crate is compiled with concurrent
feature enabled, proof generation will be
performed in multiple threads (usually, as many threads as there are logical cores on the
machine). The number of threads can be configured via RAYON_NUM_THREADS
environment
variable.
Usage
To generate a proof that a computation was executed correctly, you’ll need to do the following:
- Define an algebraic intermediate representation (AIR) for your computation. This can be done by implementing Air trait.
- Define an execution trace for your computation. This can be done by implementing Trace trait. Alternatively, you can use TraceTable struct which already implements Trace trait in cases when this generic implementation works for your use case.
- Execute your computation and record its execution trace.
- Define your prover by implementing Prover trait. Then execute Prover::prove() function passing the trace generated in the previous step into it as a parameter. The function will return a instance of StarkProof.
This StarkProof can be serialized and sent to a STARK verifier for verification. The size of proof depends on the specifics of a given computation, but for most computations it should be in the range between 15 KB (for very small computations) and 300 KB (for very large computations).
Proof generation time is also highly dependent on the specifics of a given computation, but also depends on the capabilities of the machine used to generate the proofs (i.e. on number of CPU cores and memory bandwidth).
Re-exports
Modules
Structs
Enums
Traits
Self
.Self
.Self
from bytes.Self
into bytes.